package day11.part2;

/**
 * @Author juzipi
 * @Date 2021/6/28 8:43
 * @Info
 */
public class Mason extends Builder {

    private String name = "孙子类";

    @Override
    public void work() {
        super.work();
    }

    public void nihao(){
        //串型继承（继承已经继承了其他类的类），super调用的是它的父类，并不是爷爷类
        System.out.println(super.getName());
        System.out.println(this.name);
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public void setName(String name) {
        this.name = name;
    }

    public Mason() {
    }

    public Mason(String name) {
        this.name = name;
    }

}
